<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
	<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-sclae=1.0,user-scalable=0">
	<link rel="stylesheet" type="text/css" href="css/base.css">
	<link rel="stylesheet" type="text/css" href="css/style.css">
	<script type="text/javascript" src="js/pulltorefresh.min.js"></script>
	<title>xuluo</title>
</head>
<body>
	<div class="container" style="width: 90%;height: 300px;box-sizing: border-box;margin: 0 auto;background: #009688;color: #fff;line-height: 300px;text-align: center;font-size: 20px;">
		下拉刷新
	</div>
	<script>
		var n=0;
		var ptr = PullToRefresh.init({
			mainElement: 'body',
			onRefresh: function(){
				n++;
				document.querySelector('.container').innerHTML='刷新了'+n+'次';
			}
		});
	</script>
</body>
</html>